class TaobaokeShop < ActiveRecord::Base
  named_scope :top,lambda {|limit| {
    :select=>'s.id,s.t_user_id,s.click_url,s.shop_title,ss.pic_path,u.level',
    :joins=>'s left join users u on s.t_user_id=u.t_user_id left join shops ss on ss.nick=u.nick',
    :order=>'level desc',
    :limit=>limit}}
end
